
@extends('admin.master')

@section('title', '账户管理')

@section('title_top')
    @parent
    <div class="title_top">账户管理</div>
@stop
@section('equip_query')
@stop
@section('userinfo_tab')
<table cellpadding="0" cellspacing="0" id="userinfo_tab_m">
	<thead>
		<tr>
			<td>用户编号</td>
			<td>姓名</td>
			<td>性别</td>
			<td>手机号</td>
			<td>账号属性</td>
			<td>操作</td>
		</th>
	</thead>
	<tbody>
		@if($user->hasAccess(['user.view']))
			@foreach($adminInfoList as $admin)
		<tr >
			<td class="del_username">{{ $admin->username }}</td>
			<td>{{ $admin->adminInfo->name or ''}}</td>
			<td>{{ $admin->adminInfo->sex_description }}</td>
			<td>{{ $admin->adminInfo->phone or ''}}</td>
				@if($admin->hasAccess(['admin']))
			<td>超级管理员</td>
				@else
			<td>管理员</td>
				@endif
			<td><a href="/admin/user/edit?userId={{$admin->id}}">编辑</a>
			@if($user->hasAccess(['user.delete']) && $user->id != $admin->id)
			<a class="delete_btn">删除</a>
			@endif
			</td>
		</tr>
			@endforeach
		@else
		<tr >
			<td>{{ $adminInfoList->username }}</td>
			<td>{{ $adminInfoList->adminInfo->name or ''}}</td>
			<td>{{ $adminInfoList->adminInfo->sex_description }}</td>
			<td>{{ $adminInfoList->adminInfo->phone or ''}}</td>
				@if($user->hasAccess(['admin']))
			<td>超级管理员</td>
				@else
			<td>管理员</td>
				@endif
			<td><a href="/admin/user/edit?userId={{$adminInfoList->id}}">编辑</a>
		</tr>
		@endif
	</tbody>
</table>
@stop
@section('page_num')
    <ul class="pagination pagination-lg"> 
    	{!! $adminInfoList->render() !!}
    </ul>
@stop
@section('infor_promit')
@parent

@stop
		